import request from '@/utils/request'
// 查询分页信息
export const getworklistapi = params => request.get('/pio-microservice-biz/pio/repair/work/order/page', { params })
// 新增
export const postaddworkapi = data => request.post('/pio-microservice-biz/pio/repair/work/order/add', data,{
  headers: {
    'Content-Type': 'multipart/form-data' // 设置请求头的 Content-Type 为 multipart/form-data
  }
})
// 新增时获取工单编号
export const getworkcodeapi = params => request.get('/pio-microservice-biz/pio/repair/work/order/getCode', { params })
// 删除
export const postdeletelistapi = id => request.post(`/pio-microservice-biz/pio/repair/work/order/delete?id=${id}`)
// 根据工单id查询多个图片
export const getworkimgapi = params => request.get(`/pio-microservice-biz/pio/repair/work/order/getMutiFileByOrderId`,{params})
// 提交
export const posttijiaoworkapi = data => request.post('/pio-microservice-biz/pio/repair/work/order/submit', data)
// 修改
export const postupdateworkapi=data=>request.post('/pio-microservice-biz/pio/repair/work/order/update', data,{
  headers: {
    'Content-Type': 'multipart/form-data' // 设置请求头的 Content-Type 为 multipart/form-data
  }
})
// 接单
export const postjiedanworkapi = data => request.post('/pio-microservice-biz/pio/repair/work/order/receive', data)
// 处理
export const postchuliworkapi = data => request.post('/pio-microservice-biz/pio/repair/work/order/finish', data)
// 
export const getgeytoimgapi = fileKeyword => request.get(`/pio-microservice-biz/pio/repair/work/order/getSingleFile?fileKeyword=${fileKeyword}`)
// 单个文件上传
export const setwxfileaou=data=>request.post('/pio-microservice-biz/pio/repair/work/order/muti/file/update', data,{
  headers: {
    'Content-Type': 'multipart/form-data' // 设置请求头的 Content-Type 为 multipart/form-data
  }
})